package com.pswv2.payment;

import java.io.BufferedReader;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.servlet.http.HttpSession;

import org.apache.commons.lang3.StringUtils;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.DetachedCriteria;
import org.hibernate.criterion.Order;
import org.hibernate.criterion.Restrictions;
import org.omg.CORBA.portable.InputStream;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.multipart.commons.CommonsMultipartFile;

import com.aliyun.oss.model.Style;
import com.pswv2.backstage.category.servic.CategoryService;
import com.pswv2.backstage.keyword.service.KWordService;
import com.pswv2.backstage.risk.servic.RiskService;
import com.pswv2.bub.bsc.dao.po.Category;
import com.pswv2.bub.bsc.dao.po.KWord;
import com.pswv2.bub.bsc.dao.po.Risk;
import com.pswv2.bub.bsc.dao.po.Role;
import com.pswv2.util.BackendErrorCode;
import com.pswv2.util.CommonResp;
import com.pswv2.util.ExtraSpringHibernateTemplate;
import com.pswv2.util.Paging;
import com.pswv2.util.Sessions;
import com.pswv2.util.Strings;

@Controller
@RequestMapping(value = "PaymentAction", produces = { "text/json;charset=UTF-8" })
public class PaymentAction {
	private static Class<?> poc = Risk.class;
	@Autowired
	private ExtraSpringHibernateTemplate extraSpringHibernateTemplate;
	@Autowired
	private RiskService riskService;

	/**
	 * 回调
	 */
	@ResponseBody
	@RequestMapping(value = { "getPayment" })
	public String add(String kWord,String content) {
		Risk risk = new Risk();
		risk.setkWord(kWord);
		risk.setContent(content);
		riskService.add(risk);
		return CommonResp.buildSuccessResp().toJsonString();
	}

	
}
